﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net;
using log4net.Config;
using System.IO;

namespace FAQFrameworks
{
    public class LoggerManager
    {
        private static readonly ILog log
            = LogManager.GetLogger(typeof(LoggerManager));

        static LoggerManager()
        {
            FileInfo fileInfo = new FileInfo(
                Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Log4net.xml"));

            XmlConfigurator.Configure(fileInfo);
        }

        public static void Log(Exception ex)
        {
            log.Info(ex.Message, ex);
        }
    }
}
